home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 18 / Silicon_Graphics_hot mix 18.iso / html / vendors / charybda / software / launch.csh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1998-01-20  |  610 b   |  25 lines

  1. #!/bin/csh -f
  2.  
  3. if !($?home) then
  4.         if !($?user) then
  5.                 set usermatch = "^[^:]*:[^:]*:`id -u`:"
  6.                 echo "user not set... using $usermatch"
  7.         else
  8.                 set usermatch = "^$user:"
  9.         endif
  10.  
  11.         set newhome = `grep "$usermatch" /etc/passwd | head -1 | cut -d: -f6`
  12.         echo "home directory not set... setting to $newhome"
  13.         set home = "$newhome"
  14. endif
  15.  
  16. if ($user == 'root') then
  17.     set home='/'
  18. endif
  19.  
  20. cd $home
  21.  
  22. jot -v $HOTMIXDIR/html/vendors/charybda/software/charybda/diver_demo_instr 
  23.  
  24. $HOTMIXDIR/html/vendors/charybda/software/charybda/diver  
  25.